<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;
use Slowlyo\OwlAdmin\Models\BaseModel as Model;

/**
 * 问答数据
 */
class AqConversationDetail extends Model
{
	use SoftDeletes;

	protected $table = 'aq_conversation_details';

	protected $fillable = ['conversation_id', 'request_text', 'response_text', 'request_id', 'request_data', 'api_data', 'response_data', 'score','tool_id'];

	protected $casts = [
		'request_data' => 'array',
		'response_data' => 'array',
		'api_data' => 'array',
	];
	public function conversation()
	{
		return $this->belongsTo(AqConversation::class, 'conversation_id')->withTrashed();
	}

	public function tool()
	{
		return $this->belongsTo(AqTool::class, 'tool_id');
	}
}
